<template></template>
<script lang="ts" setup>
import { onHide, onLaunch, onShow, onShareAppMessage } from '@dcloudio/uni-app'
import { useConfigStore } from '@/store/modules/config'
const configStore = useConfigStore()
onLaunch(() => {
  // console.log('App Launch')
  uni.request({
    url: '/static/config.json', // 配置文件路径
    success: (res) => {
      configStore.setConfig(res.data) // 将读取到的配置存储到 Pinia
    },
    fail: (err) => {
      console.error('Failed to load config.json:', err)
    }
  })
  const designWidth = 375 // 设计稿基准宽度
  const screenWidth = window.screen.width || document.documentElement.clientWidth
  const baseFontSize = (screenWidth / designWidth) * 16 // 16px 是设计稿默认字体大小
  document.documentElement.style.fontSize = `${baseFontSize}px`
  document.body.style.fontSize = `${baseFontSize}px`
})
onShow(() => {
  console.log('App Show')
})
onHide(() => {
  // console.log('App Hide')
})
</script>
<style>
page {
  background: #f8f8f8;
}
</style>
<style lang="scss">
/*每个页面公共css */
@import 'nutui-uniapp/styles/index';

:root,
page {
  ::-webkit-scrollbar {
    width: 0px;
    height: 0px;
  }
  --nut-cell-padding: 32rpx 32rpx;
  --nut-primary-color: #ff3c2a;
  --nut-primary-color-end: #e7f4f9;
  --nut-addresslist-contnts-contact-default: #ff3c2a;
  --nut-button-primary-background-color: #ff3c2a;
  --nut-address-region-tab-line: linear-gradient(90deg, #ff3c2a 0%, rgba(#ff3c2a, 0.15) 100%);
  --nut-tabs-horizontal-tab-line-color: linear-gradient(180deg, #ff3c2a 0%, rgba(#ff3c2a, 0.15) 100%);
  --nut-tabs-vertical-tab-line-color: linear-gradient(180deg, #ff3c2a 0%, rgba(#ff3c2a, 0.15) 100%);
  // 辅助色
  --nut-help-color: #f5f5f5;
  // 标题常规文字
  --nut-title-color: #1a1a1a;
  // 副标题
  --nut-title-color2: #666666;
  // 次内容
  --nut-text-color: #808080;
  // 特殊禁用色
  --nut-disable-color: #cccccc;
  --nut-white: #fff;
  --nut-black: #000;
  --nut-required-color: #ff3c2a;
  // 暗黑模式下颜色
  --nut-dark-background: #131313;
  --nut-dark-background2: #1b1b1b;
  --nut-nut-dark-background3: #141414;
  --nut-nut-dark-background4: #323233;
  --nut-dark-background5: #646566;
  --nut-dark-background6: #380e08;
  --nut-dark-background7: #707070;
  --nut-dark-color: var(--nut-white);
  --nut-dark-color2: #ff3c2a;
  --nut-dark-color3: rgba(232, 230, 227, 0.8);
  --nut-dark-color-gray: var(--nut-text-color);
  --nut-dark-calendar-choose-color: rgba(227, 227, 227, 0.2);
  // 字体
  --nut-font-family: PingFang SC, Microsoft YaHei, Helvetica, Hiragino Sans GB, SimSun, sans-serif;

  // Font
  --nut-font-size-0: 10px;
  --nut-font-size-1: 12px;
  --nut-font-size-2: 14px;
  --nut-font-size-3: 16px;
  --nut-font-size-4: 18px;
  --nut-font-weight-bold: 400;
  --nut-font-size-small: var(--nut-font-size-1);
  --nut-font-size-base: var(--nut-font-size-2);
  --nut-font-size-large: var(--nut-font-size-3);
  --nut-line-height-base: 1.5;
}

.nut-input {
  padding: 0 !important;
}

// #ifdef MP-WEIXIN
.mp-iphonex-bottom {
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: content-box;
  height: auto !important;
  padding-top: 10rpx;
}
// #endif

.head {
  background-color: white;
  display: flex;
  justify-content: center;
  position: fixed;
  width: 100%;
  bottom: 0;
  top: 70rpx;
  height: 100rpx;
  z-index: 2000;
}

.footer {
  background-color: white;
  display: flex;
  justify-content: center;
  position: fixed;
  width: 100%;
  bottom: 0;
  right: 0;
  height: 80rpx;
  padding-top: 20rpx;
  padding-bottom: 20rpx;
}

.custom-tabpane {
  padding: 0 !important;
  background: #f8f8f8 !important;
}

uni-toast {
  z-index: 10000;
}
</style>
